package cn.edu.scau.cmi.mingjunhui.composite.safe;

public abstract class SafeComponent {
	SafeComponent parent = null;
	String name;
	
	public SafeComponent(SafeComponent org, String _name)
	{
		parent = org;
		this.name = _name;
	}
	
	public void setName(String _name)
	{
		this.name = _name;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setParent(SafeComponent _parent)
	{
		this.parent = _parent;
	}
	
	public SafeComponent getParent()
	{
		return this.parent;
	}
	
	abstract String toString(int pos);
}
